# 05-循环.py
'''
    语法：
    while 条件:
        循环代码
'''
# 1、打印1-10
count = 0
while count<100:
    count+=1
    print(count)

# 2、打印100句您好
index=0
while index<100:
    index=index+1
    print('您好!')

# 3、计算一下1-100的和 
i =0
sum =0
while i<100:
    i+=1;
    sum+=i
print(sum)

# 4、计算出1-100偶数的和
j = 0
two = 0
while j<100:
    j+=1
    if j%2==0:
        two+=j
print('1-100偶数的和为：',two)
# 5、使用while 遍历list
list = ['张xx','李xx','赵某某']
a = 0
while a<3:
    print(list[a])
    a+=1